# coding=utf-8

# 这是一个中间件代码片段的说明，在各个位置的代码将在何时执行
def simple_middleware(get_response):
    # One-time configuration and initialization.

    def middleware(request):
        # Code to be executed for each request before
        # the view (and later middleware) are called.
        response = get_response(request)

        # Code to be executed for each request/response after
        # the view is called.

        return response

    return middleware
